package com.coolbi.onsupai.core.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.coolbi.onsupai.core.biz.AccountFundDeclareBiz;
import com.coolbi.onsupai.core.dao.AccountFundDeclareDao;
import com.coolbi.onsupai.core.entity.AccountFundDeclare;
import com.coolbi.onsupai.core.exception.ServiceException;

public class AccountFundDeclareBizImpl implements AccountFundDeclareBiz {

	@Autowired
	private AccountFundDeclareDao accountFundDeclareDao;
	public void setAccountFundDeclareDao(AccountFundDeclareDao accountFundDeclareDao) {
		this.accountFundDeclareDao = accountFundDeclareDao;
	}
	
	@Override
	public AccountFundDeclare save(AccountFundDeclare obj) {
		try {
			accountFundDeclareDao.save(obj);
		} catch (Exception e) {
			throw new ServiceException("添加客户资金流动信息发生错误！", e);
		}
		return obj;
	}

	@Override
	public void delete(long id) {
		try {
			accountFundDeclareDao.delete(id);
		} catch (Exception e) {
			throw new ServiceException("删除客户资金流动信息发生错误！", e);
		}
	}

	@Override
	public void update(AccountFundDeclare obj) {
		try {
			accountFundDeclareDao.update(obj);
		} catch (Exception e) {
			throw new ServiceException("更新客户资金流动信息发生错误！", e);
		}
	}

	@Override
	public AccountFundDeclare get(long id) {
		return accountFundDeclareDao.get(id);
	}

	@Override
	public List<AccountFundDeclare> list() {
		return accountFundDeclareDao.list();
	}

	@Override
	public List<AccountFundDeclare> listByPage(int offset, int limit) {
		return accountFundDeclareDao.listByPage(offset, limit);
	}

	@Override
	public List<AccountFundDeclare> find(Map<String, Object> parameter) {
		return accountFundDeclareDao.find(parameter);
	}

	@Override
	public List<AccountFundDeclare> findByPage(Map<String, Object> parameter,
			int offset, int limit) {
		return accountFundDeclareDao.findByPage(parameter, offset, limit);
	}

	@Override
	public List<AccountFundDeclare> search(Map<String, Object> parameter,
			int offset, int limit) {
		return accountFundDeclareDao.search(parameter, offset, limit);
	}

	@Override
	public int count() {
		return accountFundDeclareDao.count();
	}

	@Override
	public int countByKeyWord(Map<String, Object> parameter) {
		return accountFundDeclareDao.countByKeyWord(parameter);
	}

	@Override
	public int count(Map<String, Object> parameter) {
		return accountFundDeclareDao.count(parameter);
	}


}
